(defmeth homals-proto :change-to-numeric ()
  
(send self :change-matrix-to-numbers (send current-data :active-data-matrix '(category)))
  )

(defmeth homals-proto :find-caracter-in-vector (col car)
    (which (mapcar #'(lambda (el) (equal el car)) (coerce col 'list))))

(defmeth homals-proto :find-caracters-in-vector (col)
(let* (
      (cars (sort-data (remove-duplicates col :test 'equal)))
      (caracters-in-vector 
       (mapcar #'(lambda (cars2)
                          (send self :find-caracter-in-vector col cars2)
                   )
              (coerce cars 'list))))
  (list (iseq 1 (length cars)) cars caracters-in-vector)))

(defmeth homals-proto :change-by-numbers (col)
  (let* (
         (col (copy-list (combine col)))
         (miss 
          (set-difference 
           (iseq (length col))
           (which (mapcar #'(lambda (el) (read-from-string el)) col))))
         (car-in-vector (send self :find-caracters-in-vector col))
         (number (first car-in-vector))
         (cars (combine (second car-in-vector)))
         (pos (third car-in-vector))
         )
         (mapcar #'(lambda (posi num) 
                (setf (select col posi) num))
            pos number)
    (setf (select col miss) 99)
    col
  ))
(defmeth homals-proto :change-matrix-to-numbers (matrix)
  (let*
    (
     (list-of-lists
      (mapcar #'(lambda (var)
              (send self :change-by-numbers var)
              )
          (column-list matrix)))
     (mat (make-array (list 
                       (length (first list-of-lists)) 
                       (length list-of-lists)) 
                      :initial-contents (transpose list-of-lists))
          ))
    mat))



